import java.util.Arrays;

public class Solution283 {
    public void moveZeroes(int[] nums) {
        int i = 0, j = 0;
        int t = nums[j];
        while (i < nums.length) {
            if (nums[i] != 0) {
                nums[j] = nums[i];
                j++;
            }
            i++;
        }
        Arrays.fill(nums, j, nums.length, 0);
    }
}
